<div class="categorylisting">
    <%= link_to "edit categories", {# link_to options
            :controller => 'story',
            :action => 'categories',
            :id => @story.id
            } %> | 
    <% if @story.categories %>
        <% for category in @story.categories %>
        <%= link_to "#{category.title}", {# link_to options
                            :controller => 'story',
                            :action => 'in_category',
                            :id => category.title
                            } %> | 
        <% end %>
    <% end %>
</div>